package com.iknow.xmpp.service.aidl;

import android.net.Uri;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.os.RemoteException;
import com.iknow.xmpp.service.PresenceAdapter;
import com.iknow.xmpp.service.UserInfo;

public abstract interface IXmppFacade
  implements IInterface
{
  public abstract void call(String paramString)
    throws RemoteException;

  public abstract void changeStatus(int paramInt, String paramString)
    throws RemoteException;

  public abstract void connectAsync()
    throws RemoteException;

  public abstract void connectSync()
    throws RemoteException;

  public abstract IXmppConnection createConnection()
    throws RemoteException;

  public abstract void disableAvatarPublishing()
    throws RemoteException;

  public abstract void disconnect()
    throws RemoteException;

  public abstract IChatManager getChatManager()
    throws RemoteException;

  public abstract IPrivacyListManager getPrivacyListManager()
    throws RemoteException;

  public abstract IRoster getRoster()
    throws RemoteException;

  public abstract UserInfo getUserInfo()
    throws RemoteException;

  public abstract boolean publishAvatar(Uri paramUri)
    throws RemoteException;

  public abstract void sendPresencePacket(PresenceAdapter paramPresenceAdapter)
    throws RemoteException;

  public static abstract class Stub extends Binder
  implements IXmppFacade
  {
    private static final String DESCRIPTOR = "com.iknow.xmpp.service.aidl.IXmppFacade";
    static final int TRANSACTION_call = 9;
    static final int TRANSACTION_changeStatus = 7;
    static final int TRANSACTION_connectAsync = 4;
    static final int TRANSACTION_connectSync = 3;
    static final int TRANSACTION_createConnection = 1;
    static final int TRANSACTION_disableAvatarPublishing = 11;
    static final int TRANSACTION_disconnect = 5;
    static final int TRANSACTION_getChatManager = 6;
    static final int TRANSACTION_getPrivacyListManager = 13;
    static final int TRANSACTION_getRoster = 2;
    static final int TRANSACTION_getUserInfo = 12;
    static final int TRANSACTION_publishAvatar = 10;
    static final int TRANSACTION_sendPresencePacket = 8;

    public Stub()
    {
      attachInterface(this, "com.iknow.xmpp.service.aidl.IXmppFacade");
    }

    public static IXmppFacade asInterface(IBinder paramIBinder)
    {
      Object localObject;
      if (paramIBinder == null)
        localObject = null;
      while (true)
      {
        while (true)
        {
          return localObject;
          IInterface localIInterface = paramIBinder.queryLocalInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
          if ((localIInterface == null) || (!(localIInterface instanceof IXmppFacade)))
            break;
          localObject = (IXmppFacade)localIInterface;
        }
        localObject = new Proxy(paramIBinder);
      }
    }

    public IBinder asBinder()
    {
      return this;
    }

    public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2)
      throws RemoteException
    {
      label520: IBinder localIBinder1;
      boolean bool1;
      switch (paramInt1)
      {
      default:
        bool1 = super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2);
      case 1598968902:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      case 11:
        while (true)
        {
          Uri localUri;
          int i;
          while (true)
          {
            PresenceAdapter localPresenceAdapter;
            while (true)
            {
              IBinder localIBinder2;
              while (true)
              {
                while (true)
                {
                  while (true)
                  {
                    IBinder localIBinder3;
                    IBinder localIBinder4;
                    while (true)
                    {
                      return bool1;
                      paramParcel2.writeString("com.iknow.xmpp.service.aidl.IXmppFacade");
                      bool1 = true;
                    }
                    paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
                    IXmppConnection localIXmppConnection = createConnection();
                    paramParcel2.writeNoException();
                    if (localIXmppConnection != null)
                      localIBinder4 = localIXmppConnection.asBinder();
                    while (true)
                    {
                      while (true)
                      {
                        paramParcel2.writeStrongBinder(localIBinder4);
                        bool1 = true;
                      }
                      localIBinder4 = null;
                    }
                    paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
                    IRoster localIRoster = getRoster();
                    paramParcel2.writeNoException();
                    if (localIRoster != null)
                      localIBinder3 = localIRoster.asBinder();
                    while (true)
                    {
                      while (true)
                      {
                        paramParcel2.writeStrongBinder(localIBinder3);
                        bool1 = true;
                      }
                      localIBinder3 = null;
                    }
                    paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
                    connectSync();
                    paramParcel2.writeNoException();
                    bool1 = true;
                  }
                  paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
                  connectAsync();
                  paramParcel2.writeNoException();
                  bool1 = true;
                }
                paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
                disconnect();
                paramParcel2.writeNoException();
                bool1 = true;
              }
              paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
              IChatManager localIChatManager = getChatManager();
              paramParcel2.writeNoException();
              if (localIChatManager != null)
                localIBinder2 = localIChatManager.asBinder();
              while (true)
              {
                while (true)
                {
                  paramParcel2.writeStrongBinder(localIBinder2);
                  bool1 = true;
                }
                localIBinder2 = null;
              }
              paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
              changeStatus(paramParcel1.readInt(), paramParcel1.readString());
              paramParcel2.writeNoException();
              bool1 = true;
            }
            paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
            if (paramParcel1.readInt() != 0)
              localPresenceAdapter = (PresenceAdapter)PresenceAdapter.CREATOR.createFromParcel(paramParcel1);
            while (true)
            {
              while (true)
              {
                sendPresencePacket(localPresenceAdapter);
                paramParcel2.writeNoException();
                bool1 = true;
              }
              localPresenceAdapter = null;
            }
            paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
            call(paramParcel1.readString());
            paramParcel2.writeNoException();
            bool1 = true;
          }
          paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
          if (paramParcel1.readInt() != 0)
          {
            localUri = (Uri)Uri.CREATOR.createFromParcel(paramParcel1);
            boolean bool2 = publishAvatar(localUri);
            paramParcel2.writeNoException();
            if (!(bool2))
              break label520;
            i = 1;
          }
          while (true)
          {
            while (true)
            {
              while (true)
              {
                paramParcel2.writeInt(i);
                bool1 = true;
              }
              localUri = null;
            }
            i = 0;
          }
          paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
          disableAvatarPublishing();
          paramParcel2.writeNoException();
          bool1 = true;
        }
      case 12:
        paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
        UserInfo localUserInfo = getUserInfo();
        paramParcel2.writeNoException();
        if (localUserInfo != null)
        {
          paramParcel2.writeInt(1);
          localUserInfo.writeToParcel(paramParcel2, 1);
        }
        while (true)
        {
          while (true)
            bool1 = true;
          paramParcel2.writeInt(0);
        }
      case 13:
      }
      paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IXmppFacade");
      IPrivacyListManager localIPrivacyListManager = getPrivacyListManager();
      paramParcel2.writeNoException();
      if (localIPrivacyListManager != null)
        localIBinder1 = localIPrivacyListManager.asBinder();
      while (true)
      {
        while (true)
        {
          paramParcel2.writeStrongBinder(localIBinder1);
          bool1 = true;
        }
        localIBinder1 = null;
      }
    }

    private static class Proxy
  implements IXmppFacade
    {
      private IBinder mRemote;

      Proxy(IBinder paramIBinder)
      {
        this.mRemote = paramIBinder;
      }

      public IBinder asBinder()
      {
        return this.mRemote;
      }

      public void call(String paramString)
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          localParcel1.writeString(paramString);
          this.mRemote.transact(9, localParcel1, localParcel2, 0);
          localParcel2.readException();
          return;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public void changeStatus(int paramInt, String paramString)
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          localParcel1.writeInt(paramInt);
          localParcel1.writeString(paramString);
          this.mRemote.transact(7, localParcel1, localParcel2, 0);
          localParcel2.readException();
          return;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public void connectAsync()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          this.mRemote.transact(4, localParcel1, localParcel2, 0);
          localParcel2.readException();
          return;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public void connectSync()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          this.mRemote.transact(3, localParcel1, localParcel2, 0);
          localParcel2.readException();
          return;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public IXmppConnection createConnection()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          this.mRemote.transact(1, localParcel1, localParcel2, 0);
          localParcel2.readException();
          IXmppConnection localIXmppConnection = IXmppConnection.Stub.asInterface(localParcel2.readStrongBinder());
          return localIXmppConnection;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public void disableAvatarPublishing()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          this.mRemote.transact(11, localParcel1, localParcel2, 0);
          localParcel2.readException();
          return;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public void disconnect()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          this.mRemote.transact(5, localParcel1, localParcel2, 0);
          localParcel2.readException();
          return;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public IChatManager getChatManager()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          this.mRemote.transact(6, localParcel1, localParcel2, 0);
          localParcel2.readException();
          IChatManager localIChatManager = IChatManager.Stub.asInterface(localParcel2.readStrongBinder());
          return localIChatManager;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public String getInterfaceDescriptor()
      {
        return "com.iknow.xmpp.service.aidl.IXmppFacade";
      }

      public IPrivacyListManager getPrivacyListManager()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          this.mRemote.transact(13, localParcel1, localParcel2, 0);
          localParcel2.readException();
          IPrivacyListManager localIPrivacyListManager = IPrivacyListManager.Stub.asInterface(localParcel2.readStrongBinder());
          return localIPrivacyListManager;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public IRoster getRoster()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          this.mRemote.transact(2, localParcel1, localParcel2, 0);
          localParcel2.readException();
          IRoster localIRoster = IRoster.Stub.asInterface(localParcel2.readStrongBinder());
          return localIRoster;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      // ERROR //
      public UserInfo getUserInfo()
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 30	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_1
        //   4: invokestatic 30	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_2
        //   8: aload_1
        //   9: ldc 32
        //   11: invokevirtual 35	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: aload_0
        //   15: getfield 18	com/iknow/xmpp/service/aidl/IXmppFacade$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   18: bipush 12
        //   20: aload_1
        //   21: aload_2
        //   22: iconst_0
        //   23: invokeinterface 44 5 0
        //   28: pop
        //   29: aload_2
        //   30: invokevirtual 47	android/os/Parcel:readException	()V
        //   33: aload_2
        //   34: invokevirtual 100	android/os/Parcel:readInt	()I
        //   37: ifeq +28 -> 65
        //   40: getstatic 106	com/iknow/xmpp/service/UserInfo:CREATOR	Landroid/os/Parcelable$Creator;
        //   43: aload_2
        //   44: invokeinterface 112 2 0
        //   49: checkcast 102	com/iknow/xmpp/service/UserInfo
        //   52: astore 5
        //   54: aload_2
        //   55: invokevirtual 50	android/os/Parcel:recycle	()V
        //   58: aload_1
        //   59: invokevirtual 50	android/os/Parcel:recycle	()V
        //   62: aload 5
        //   64: areturn
        //   65: aconst_null
        //   66: astore 5
        //   68: goto -14 -> 54
        //   71: astore_3
        //   72: aload_2
        //   73: invokevirtual 50	android/os/Parcel:recycle	()V
        //   76: aload_1
        //   77: invokevirtual 50	android/os/Parcel:recycle	()V
        //   80: aload_3
        //   81: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	54	71	finally
      }

      public boolean publishAvatar(Uri paramUri)
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          if (paramUri != null)
          {
            localParcel1.writeInt(1);
            paramUri.writeToParcel(localParcel1, 0);
            this.mRemote.transact(10, localParcel1, localParcel2, 0);
            localParcel2.readException();
            int i = localParcel2.readInt();
            label94: if (i == 0)
              break label94;
          }
        }
        finally
        {
          while (true)
          {
            localParcel2.recycle();
            localParcel1.recycle();
            throw localObject;
            int j = 0;
          }
        }
      }

      public void sendPresencePacket(PresenceAdapter paramPresenceAdapter)
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IXmppFacade");
          if (paramPresenceAdapter != null)
          {
            localParcel1.writeInt(1);
            paramPresenceAdapter.writeToParcel(localParcel1, 0);
            this.mRemote.transact(8, localParcel1, localParcel2, 0);
            localParcel2.readException();
            localParcel2.recycle();
            localParcel1.recycle();
          }
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }
    }
  }
}